package asn.match.model;

// Generated 15 juin 2014 03:03:18 by Hibernate Tools 4.0.0

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.CascadeType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Profil generated by hbm2java
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "profil", catalog = "muslima_sphere")
public class Profil implements java.io.Serializable {

	private Integer idProfil;
	private String status;
	private String ipAdress;
	private Date createdAt;
	private Date modifiedAt;
	private Set<RessourceContainer> ressourceContainers = new HashSet<RessourceContainer>(
			0);
	private Set<MemberAccount> memberAccounts = new HashSet<MemberAccount>(0);
	private Set<AboutMember> aboutMembers = new HashSet<AboutMember>(0);

	public Profil() {
	}

	public Profil(Date createdAt, Date modifiedAt) {
		this.createdAt = createdAt;
		this.modifiedAt = modifiedAt;
	}

	public Profil(String status, String ipAdress, Date createdAt,
			Date modifiedAt, Set<RessourceContainer> ressourceContainers,
			Set<MemberAccount> memberAccounts, Set<AboutMember> aboutMembers) {
		this.status = status;
		this.ipAdress = ipAdress;
		this.createdAt = createdAt;
		this.modifiedAt = modifiedAt;
		this.ressourceContainers = ressourceContainers;
		this.memberAccounts = memberAccounts;
		this.aboutMembers = aboutMembers;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id_profil", unique = true, nullable = false)
	public Integer getIdProfil() {
		return this.idProfil;
	}

	public void setIdProfil(Integer idProfil) {
		this.idProfil = idProfil;
	}

	@Column(name = "status", length = 12)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name = "ip_adress", length = 25)
	public String getIpAdress() {
		return this.ipAdress;
	}

	public void setIpAdress(String ipAdress) {
		this.ipAdress = ipAdress;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "created_at", nullable = false, length = 19)
	public Date getCreatedAt() {
		return this.createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "modified_at", nullable = false, length = 19)
	public Date getModifiedAt() {
		return this.modifiedAt;
	}

	public void setModifiedAt(Date modifiedAt) {
		this.modifiedAt = modifiedAt;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "profil", cascade={CascadeType.PERSIST,CascadeType.REMOVE})
	public Set<RessourceContainer> getRessourceContainers() {
		return this.ressourceContainers;
	}

	public void setRessourceContainers(
			Set<RessourceContainer> ressourceContainers) {
		this.ressourceContainers = ressourceContainers;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "profil")
	public Set<MemberAccount> getMemberAccounts() {
		return this.memberAccounts;
	}

	public void setMemberAccounts(Set<MemberAccount> memberAccounts) {
		this.memberAccounts = memberAccounts;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "profil", cascade={CascadeType.PERSIST,CascadeType.REMOVE})
	public Set<AboutMember> getAboutMembers() {
		return this.aboutMembers;
	}

	public void setAboutMembers(Set<AboutMember> aboutMembers) {
		this.aboutMembers = aboutMembers;
	}

}
